<template>
  <van-dialog :show="!userInfo.isCanUseAi" title="您还不是会员" message="升级会员，畅想独家优惠，获取更多权益！" show-confirm-button
    show-cancel-button @confirm="confirm" @cancel="cancel">
  </van-dialog>
</template>
<script setup>
import { ref, computed, getCurrentInstance } from 'vue';
import { useUserStore } from '@/store/modules'
const userStore = useUserStore();
let { proxy } = getCurrentInstance();
const props = defineProps({
  show: {
    type: Boolean,
    default: false
  }
})
const userInfo = computed(() => {
  return userStore.userInfo;
})
const emit = defineEmits(['confirm', 'cancel'])
const confirm = () => {
  uni.navigateTo({
    url: '/user-center/vip/index'
  });
  // Toast({
  //   message: '您还不是付费会员',
  //   onClose: () => {
  //     uni.navigateTo({
  //       url: '/user-center/vip/index'
  //     });
  //   }
  // });
  // emit('confirm')
}

const cancel = () => {
  emit('cancel')
}
</script>
<style lang="less" scoped></style>